package com.模板方法模式.demo2;

/**
 * 煮方便面模板实现类
 * @author Fang Ruichuan
 * @date 2023-01-14 10:06
 */
public class InstantNodlesTemplate extends AbstractTemplate {
    @Override
    public void boilWater() {
        System.out.println("烧开水啦！");
    }

    @Override
    public void cookNoodles() {
        System.out.println("放入方便面啦！");
    }

    @Override
    public void putCodiment() {
        System.out.println("可以放调料啦！");
    }
}

// 客户端场景类
class Client {
    public static void main(String[] args) {
        AbstractTemplate template = new InstantNodlesTemplate();
        template.finish();
    }
}
